from page.api.seniverse_weather_api import SeniverseWeatherApi

LANG_ZH_HANS = "zh-Hans"
UNIT_C = "c"

"""
心知天气 https://www.seniverse.com/
"""

def now(url, location, language=LANG_ZH_HANS, unit=UNIT_C, key=None, logger=None):
    api = SeniverseWeatherApi(url, logger)
    return api.get_now(
        location=location,
        language=language,
        unit=unit,
        key=key
    )
